﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Unity;
using Sagacious.DataSources;

namespace Sagacious.Services
{
    public static class DependencyContainer
    {
        private static IUnityContainer _container = null;
        public static IUnityContainer Container
        {
            get
            {
                if (_container == null)
                {
                    _container = new UnityContainer();
                    InitializeContainer();
                }

                return _container;
            }
        }

        private static void InitializeContainer()
        {
            _container.RegisterInstance<ILogEntryDataSource>(new LogEntryDataSource());
        }
    }
}
